package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallStore;
import com.appkubes.mall.core.po.MallStoreExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallStoreMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_store
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallStoreSqlProvider.class, method="countByExample")
    long countByExample(MallStoreExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_store
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallStoreSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallStoreExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_store
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_store",
        "where store_key = #{storeKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String storeKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_store
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_store (store_key, app_key, ",
        "apply_source_key, apply_soure_type, ",
        "store_name, tel, ",
        "province, city, ",
        "address, shipping_address, ",
        "`status`, audit_msg, ",
        "audit_time, create_time, ",
        "update_time, longitude, ",
        "latitude, description)",
        "values (#{storeKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{applySourceKey,jdbcType=VARCHAR}, #{applySoureType,jdbcType=VARCHAR}, ",
        "#{storeName,jdbcType=VARCHAR}, #{tel,jdbcType=VARCHAR}, ",
        "#{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, ",
        "#{address,jdbcType=VARCHAR}, #{shippingAddress,jdbcType=VARCHAR}, ",
        "#{status,jdbcType=VARCHAR}, #{auditMsg,jdbcType=VARCHAR}, ",
        "#{auditTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP}, #{longitude,jdbcType=VARCHAR}, ",
        "#{latitude,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR})"
    })
    int insert(MallStore record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_store
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallStoreSqlProvider.class, method="insertSelective")
    int insertSelective(MallStore record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_store
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallStoreSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="store_key", property="storeKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="apply_source_key", property="applySourceKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="apply_soure_type", property="applySoureType", jdbcType=JdbcType.VARCHAR),
        @Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR),
        @Result(column="tel", property="tel", jdbcType=JdbcType.VARCHAR),
        @Result(column="province", property="province", jdbcType=JdbcType.VARCHAR),
        @Result(column="city", property="city", jdbcType=JdbcType.VARCHAR),
        @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
        @Result(column="shipping_address", property="shippingAddress", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.VARCHAR),
        @Result(column="audit_msg", property="auditMsg", jdbcType=JdbcType.VARCHAR),
        @Result(column="audit_time", property="auditTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="longitude", property="longitude", jdbcType=JdbcType.VARCHAR),
        @Result(column="latitude", property="latitude", jdbcType=JdbcType.VARCHAR),
        @Result(column="description", property="description", jdbcType=JdbcType.VARCHAR)
    })
    List<MallStore> selectByExampleWithRowbounds(MallStoreExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_store
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallStoreSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="store_key", property="storeKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="apply_source_key", property="applySourceKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="apply_soure_type", property="applySoureType", jdbcType=JdbcType.VARCHAR),
        @Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR),
        @Result(column="tel", property="tel", jdbcType=JdbcType.VARCHAR),
        @Result(column="province", property="province", jdbcType=JdbcType.VARCHAR),
        @Result(column="city", property="city", jdbcType=JdbcType.VARCHAR),
        @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
        @Result(column="shipping_address", property="shippingAddress", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.VARCHAR),
        @Result(column="audit_msg", property="auditMsg", jdbcType=JdbcType.VARCHAR),
        @Result(column="audit_time", property="auditTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="longitude", property="longitude", jdbcType=JdbcType.VARCHAR),
        @Result(column="latitude", property="latitude", jdbcType=JdbcType.VARCHAR),
        @Result(column="description", property="description", jdbcType=JdbcType.VARCHAR)
    })
    List<MallStore> selectByExample(MallStoreExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_store
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "store_key, app_key, apply_source_key, apply_soure_type, store_name, tel, province, ",
        "city, address, shipping_address, `status`, audit_msg, audit_time, create_time, ",
        "update_time, longitude, latitude, description",
        "from mall_store",
        "where store_key = #{storeKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="store_key", property="storeKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="apply_source_key", property="applySourceKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="apply_soure_type", property="applySoureType", jdbcType=JdbcType.VARCHAR),
        @Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR),
        @Result(column="tel", property="tel", jdbcType=JdbcType.VARCHAR),
        @Result(column="province", property="province", jdbcType=JdbcType.VARCHAR),
        @Result(column="city", property="city", jdbcType=JdbcType.VARCHAR),
        @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
        @Result(column="shipping_address", property="shippingAddress", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.VARCHAR),
        @Result(column="audit_msg", property="auditMsg", jdbcType=JdbcType.VARCHAR),
        @Result(column="audit_time", property="auditTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="longitude", property="longitude", jdbcType=JdbcType.VARCHAR),
        @Result(column="latitude", property="latitude", jdbcType=JdbcType.VARCHAR),
        @Result(column="description", property="description", jdbcType=JdbcType.VARCHAR)
    })
    MallStore selectByPrimaryKey(String storeKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_store
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallStoreSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallStore record, @Param("example") MallStoreExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_store
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallStoreSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallStore record, @Param("example") MallStoreExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_store
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallStoreSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallStore record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_store
     *
     * @mbg.generated
     */
    @Update({
        "update mall_store",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "apply_source_key = #{applySourceKey,jdbcType=VARCHAR},",
          "apply_soure_type = #{applySoureType,jdbcType=VARCHAR},",
          "store_name = #{storeName,jdbcType=VARCHAR},",
          "tel = #{tel,jdbcType=VARCHAR},",
          "province = #{province,jdbcType=VARCHAR},",
          "city = #{city,jdbcType=VARCHAR},",
          "address = #{address,jdbcType=VARCHAR},",
          "shipping_address = #{shippingAddress,jdbcType=VARCHAR},",
          "`status` = #{status,jdbcType=VARCHAR},",
          "audit_msg = #{auditMsg,jdbcType=VARCHAR},",
          "audit_time = #{auditTime,jdbcType=TIMESTAMP},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "update_time = #{updateTime,jdbcType=TIMESTAMP},",
          "longitude = #{longitude,jdbcType=VARCHAR},",
          "latitude = #{latitude,jdbcType=VARCHAR},",
          "description = #{description,jdbcType=VARCHAR}",
        "where store_key = #{storeKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallStore record);
}